﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

//Unused prototypes
namespace SudoForm
{
    class location
    {
        public int Row;//横
        public int Col;//竖

        protected int   Rowarea;//横区域
        public void setRowarea(int a)
        {
            Rowarea = (a - 1) / 3 + 1;
        }

        protected int Colarea;//竖区域
        public void setColarea(int a)
        {
            Colarea = (a - 1) / 3 + 1;
        }
    }
    class Item:location
    {
        public bool Status;//取值是否唯一
        public int[] passible;//可能值
    }
   

    public partial class UnusedForm1 : Form                               //unsafe:指针和固定大小缓冲区只能在不安全的上下文中使用
    {
        //int** p;
        public UnusedForm1()
        {
            InitializeComponent();
        }

        public void Form1_Load(object sender, EventArgs e)          //应该是private
        {
            for (int i = 1; i < 10; i++)
            {
                for (int j = 1; j < 10; j++)
                {
                    TextBox textBox = new TextBox();
                    this.panel1.Controls.Add(textBox);
                    textBox.Location = new System.Drawing.Point(8 + 30 * i, 8 + 30 * j);//显示位置
                    textBox.Size = new System.Drawing.Size(30, 30);//输入框大小
                    textBox.Name = i.ToString() + j.ToString();//输入框名字
                    
                    //string name = textBox.Name;
                    
                    /*废弃方案
                     *p[i][j] = &this.textBox;                        将textbox得值输入进指针
                    textBox.Name = p[i][j].ToString();*/
                }

            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            for (int x = 0; x < 9; x++) 
            {
                for (int y = 0; y < 9; y++)
                {
                    Item items = new Item();
                    UnusedForm1 form = new UnusedForm1();
                    string name = x.ToString() + y.ToString();
                    //int text = form.name.Text;
                    //if (form.Form1_Load.name.t)
                    //{

                    //}
                    
                }
            }

        }

        private void toolTip1_Popup(object sender, PopupEventArgs e)
        {

        }
    } 
}
